require.config({baseUrl: '/js/lib',urlArgs: "v0.0.1"});
require(['zepto', 'lib'], function($, lib) {
  var fn = {}, lib = new lib();
  $.extend(fn, {
    init: function(){
      
      this.bindEvent();
    },
    bindEvent: function(){
      lib.onLoading();
      $(document).on('tap', 'div.ui-red-botton', function(data){
        lib.ajx(lib.getReq().ser + 'user/logout.action', {}, function(data){
          if(data.infocode === '0')
            location.href = './login.html';
          else lib.showMessage(data.info);
        }, function(){
          lib.showMessage("网络延时，请稍后再试");
        });
      });
    },
  });
  
  fn.init();
});